* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.box {
    position: relative;
    width: 600px;
    height: 375px;
    background-image: url("images/bg.jpg");
    /* 背景图片自适应 */
    background-size: cover;
    background-color: pink;
    overflow: hidden;
}

.box::before {
    content: '最终幻想7 - 重制版';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: -375px;
    line-height: 375px;
    text-align: center;
    color: #fff;
    font-size: 30px;
    background-color: rgba(0, 0, 0, 0.2);
}

.box:hover::before {
    top: 0;
    animation: dropdown 2s;
}

/* 定义下降动画 */
@keyframes dropdown {
    0% {
        top: -375px;
    }
    5% {
        top: 0;
    }
    10% {
        top: -30px;
    }
    20% {
        top: 0;
    }
    30% {
        top: -20px;
    }
    40% {
        top: 0;
    }
    50% {
        top: -15px;
    }
    60% {
        top: 0;
    }
    70% {
        top: -10px;
    }
    80% {
        top: 0;
    }
    90% {
        top: -5px;
    }
    100% {
        top: 0;
    }
}
